﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using DTOQLDV;
using BUSQLDV;

namespace BUSQLDV
{
    public class BUSThread
    {
        public static List<DTODuLieu> _dsDuLieu;
        private static List<DTODuLieuEX> _dsDuLieuEx;
        private static Thread _threadNhap;
        private static Thread _threadXoa;
        private static void XoaDuLieu()
        {
            if (_dsDuLieu!=null && _dsDuLieu.Count > 0)
            {
                BUSDuLieu.XoaDanhSach(_dsDuLieu);
            }
        }

        public static void ThucHienThreadXoaDuLieu()
        {
            _threadXoa = new Thread(new ThreadStart(XoaDuLieu));
            _threadXoa.IsBackground = true;  
            _threadXoa.Start();  
        }
        private static void NhapDuLieu()
        {

        }
        public static void ThucHienThreadNhapDuLieu()
        {
            _threadNhap = new Thread(new ThreadStart(NhapDuLieu));
            _threadNhap.IsBackground = true;
            _threadNhap.Start();  
        }
    }
}
